package com.sk.weichat.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @Author: chenzl
 * @ClassName: SubjectItemBean
 * @Description: java类作用描述
 * @CreateDate: 2019/10/24 18:07
 */
public class SubjectItemBean implements Parcelable {

    /**
     * createDatetime : 1571656394
     * creatorId : 10000
     * id : 5dad951a5e599a3370ccbda7
     * topicName : 指点悦聊打江山
     * type : SYSTEM
     */

    private int createDatetime;
    private int creatorId;
    private String id;
    private String topicName;
    private String type;
    private boolean isSelect;
    //该话题下的动态数量
    private int msgSum;

    public SubjectItemBean() {
    }

    protected SubjectItemBean(Parcel in) {
        createDatetime = in.readInt();
        creatorId = in.readInt();
        id = in.readString();
        topicName = in.readString();
        type = in.readString();
        isSelect = in.readByte() != 0;
        msgSum = in.readInt();
    }

    public static final Creator<SubjectItemBean> CREATOR = new Creator<SubjectItemBean>() {
        @Override
        public SubjectItemBean createFromParcel(Parcel in) {
            return new SubjectItemBean(in);
        }

        @Override
        public SubjectItemBean[] newArray(int size) {
            return new SubjectItemBean[size];
        }
    };

    public int getCreateDatetime() {
        return createDatetime;
    }

    public void setCreateDatetime(int createDatetime) {
        this.createDatetime = createDatetime;
    }

    public int getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(int creatorId) {
        this.creatorId = creatorId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTopicName() {
        return topicName;
    }

    public void setTopicName(String topicName) {
        this.topicName = topicName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean isSelect() {
        return isSelect;
    }

    public void setSelect(boolean select) {
        isSelect = select;
    }

    public int getMsgSum() {
        return msgSum;
    }

    public void setMsgSum(int msgSum) {
        this.msgSum = msgSum;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(createDatetime);
        dest.writeInt(creatorId);
        dest.writeString(id);
        dest.writeString(topicName);
        dest.writeString(type);
        dest.writeByte((byte) (isSelect ? 1 : 0));
        dest.writeInt(msgSum);
    }
}
